doctype html
html(lang="en")
 head
  title= title
  meta(charset="utf-8")
  meta(http-equiv="X-UA-Compatible" content="IE=edge")
  meta(name="viewport" content="width=device-width, initial-scale=1")
  meta(name="description" content="")
  meta(name="author" content="")
  link(rel='stylesheet', href='/stylesheets/waterfall.css')
  link(rel="shortcut icon" href="/images/favicon.ico") 
 body
  #container
  script(src='',type="text/x-handlebars-template")#waterfall-tpl.
   {{#result}}
    <div class="item">
        <img src="{{image}}" width="{{width}}" height="{{height}}" />
    </div>
   {{/result}}
  script(src="/javascripts/jquery-1.11.0.min.js")
  script(src="/javascripts/bootstrap.min.js")
  script(src='/javascripts/waterfall.js')
  script(src='/javascripts/handlebars.js')
  script(src='/javascripts/imageload.js')
  script.
   $('#container').waterfall({itemCls: 'item',
   corlWidth: 222,
   gutterWidth: 15,
   gutterHeight: 15,
   isFadeIn: true,
   checkImagesLoaded: true,
   debug: true,
   maxPage: #{max},
   dataType:'html',
   path: function(page) {
   return 'http://localhost:3000/loadImg?page='+page;
   }});




